import 'package:easydouban/generated/json/base/json_convert_content.dart';
import 'package:easydouban/bean/i_movie_detail_entity.dart';

IMovieDetailEntity $IMovieDetailEntityFromJson(Map<String, dynamic> json) {
	final IMovieDetailEntity iMovieDetailEntity = IMovieDetailEntity();
	final List<IMovieDetailData>? data = jsonConvert.convertListNotNull<IMovieDetailData>(json['data']);
	if (data != null) {
		iMovieDetailEntity.data = data;
	}
	final List<IMovieDetailWriter>? writer = jsonConvert.convertListNotNull<IMovieDetailWriter>(json['writer']);
	if (writer != null) {
		iMovieDetailEntity.writer = writer;
	}
	final List<IMovieDetailActor>? actor = jsonConvert.convertListNotNull<IMovieDetailActor>(json['actor']);
	if (actor != null) {
		iMovieDetailEntity.actor = actor;
	}
	final List<IMovieDetailDirector>? director = jsonConvert.convertListNotNull<IMovieDetailDirector>(json['director']);
	if (director != null) {
		iMovieDetailEntity.director = director;
	}
	final int? createdAt = jsonConvert.convert<int>(json['createdAt']);
	if (createdAt != null) {
		iMovieDetailEntity.createdAt = createdAt;
	}
	final int? updatedAt = jsonConvert.convert<int>(json['updatedAt']);
	if (updatedAt != null) {
		iMovieDetailEntity.updatedAt = updatedAt;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		iMovieDetailEntity.id = id;
	}
	final String? originalName = jsonConvert.convert<String>(json['originalName']);
	if (originalName != null) {
		iMovieDetailEntity.originalName = originalName;
	}
	final int? imdbVotes = jsonConvert.convert<int>(json['imdbVotes']);
	if (imdbVotes != null) {
		iMovieDetailEntity.imdbVotes = imdbVotes;
	}
	final String? imdbRating = jsonConvert.convert<String>(json['imdbRating']);
	if (imdbRating != null) {
		iMovieDetailEntity.imdbRating = imdbRating;
	}
	final String? rottenRating = jsonConvert.convert<String>(json['rottenRating']);
	if (rottenRating != null) {
		iMovieDetailEntity.rottenRating = rottenRating;
	}
	final int? rottenVotes = jsonConvert.convert<int>(json['rottenVotes']);
	if (rottenVotes != null) {
		iMovieDetailEntity.rottenVotes = rottenVotes;
	}
	final String? year = jsonConvert.convert<String>(json['year']);
	if (year != null) {
		iMovieDetailEntity.year = year;
	}else{
		iMovieDetailEntity.year = '';
	}
	final String? imdbId = jsonConvert.convert<String>(json['imdbId']);
	if (imdbId != null) {
		iMovieDetailEntity.imdbId = imdbId;
	}
	final String? alias = jsonConvert.convert<String>(json['alias']);
	if (alias != null) {
		iMovieDetailEntity.alias = alias;
	}
	final String? doubanId = jsonConvert.convert<String>(json['doubanId']);
	if (doubanId != null) {
		iMovieDetailEntity.doubanId = doubanId;
	}
	final String? type = jsonConvert.convert<String>(json['type']);
	if (type != null) {
		iMovieDetailEntity.type = type;
	}
	final String? doubanRating = jsonConvert.convert<String>(json['doubanRating']);
	if (doubanRating != null) {
		iMovieDetailEntity.doubanRating = doubanRating;
	}
	final int? doubanVotes = jsonConvert.convert<int>(json['doubanVotes']);
	if (doubanVotes != null) {
		iMovieDetailEntity.doubanVotes = doubanVotes;
	}
	final int? duration = jsonConvert.convert<int>(json['duration']);
	if (duration != null) {
		iMovieDetailEntity.duration = duration;
	}
	final String? dateReleased = jsonConvert.convert<String>(json['dateReleased']);
	if (dateReleased != null) {
		iMovieDetailEntity.dateReleased = dateReleased;
	}else{
		iMovieDetailEntity.dateReleased = '';
	}
	return iMovieDetailEntity;
}

Map<String, dynamic> $IMovieDetailEntityToJson(IMovieDetailEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['data'] =  entity.data.map((v) => v.toJson()).toList();
	data['writer'] =  entity.writer.map((v) => v.toJson()).toList();
	data['actor'] =  entity.actor.map((v) => v.toJson()).toList();
	data['director'] =  entity.director.map((v) => v.toJson()).toList();
	data['createdAt'] = entity.createdAt;
	data['updatedAt'] = entity.updatedAt;
	data['id'] = entity.id;
	data['originalName'] = entity.originalName;
	data['imdbVotes'] = entity.imdbVotes;
	data['imdbRating'] = entity.imdbRating;
	data['rottenRating'] = entity.rottenRating;
	data['rottenVotes'] = entity.rottenVotes;
	data['year'] = entity.year;
	data['imdbId'] = entity.imdbId;
	data['alias'] = entity.alias;
	data['doubanId'] = entity.doubanId;
	data['type'] = entity.type;
	data['doubanRating'] = entity.doubanRating;
	data['doubanVotes'] = entity.doubanVotes;
	data['duration'] = entity.duration;
	data['dateReleased'] = entity.dateReleased;
	return data;
}

IMovieDetailData $IMovieDetailDataFromJson(Map<String, dynamic> json) {
	final IMovieDetailData iMovieDetailData = IMovieDetailData();
	final int? createdAt = jsonConvert.convert<int>(json['createdAt']);
	if (createdAt != null) {
		iMovieDetailData.createdAt = createdAt;
	}
	final int? updatedAt = jsonConvert.convert<int>(json['updatedAt']);
	if (updatedAt != null) {
		iMovieDetailData.updatedAt = updatedAt;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		iMovieDetailData.id = id;
	}
	final String? poster = jsonConvert.convert<String>(json['poster']);
	if (poster != null) {
		iMovieDetailData.poster = poster;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		iMovieDetailData.name = name;
	}
	final String? genre = jsonConvert.convert<String>(json['genre']);
	if (genre != null) {
		iMovieDetailData.genre = genre;
	}
	final String? description = jsonConvert.convert<String>(json['description']);
	if (description != null) {
		iMovieDetailData.description = description;
	}
	final String? language = jsonConvert.convert<String>(json['language']);
	if (language != null) {
		iMovieDetailData.language = language;
	}
	final String? country = jsonConvert.convert<String>(json['country']);
	if (country != null) {
		iMovieDetailData.country = country;
	}
	final String? lang = jsonConvert.convert<String>(json['lang']);
	if (lang != null) {
		iMovieDetailData.lang = lang;
	}
	final String? shareImage = jsonConvert.convert<String>(json['shareImage']);
	if (shareImage != null) {
		iMovieDetailData.shareImage = shareImage;
	}
	final String? movie = jsonConvert.convert<String>(json['movie']);
	if (movie != null) {
		iMovieDetailData.movie = movie;
	}
	return iMovieDetailData;
}

Map<String, dynamic> $IMovieDetailDataToJson(IMovieDetailData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['createdAt'] = entity.createdAt;
	data['updatedAt'] = entity.updatedAt;
	data['id'] = entity.id;
	data['poster'] = entity.poster;
	data['name'] = entity.name;
	data['genre'] = entity.genre;
	data['description'] = entity.description;
	data['language'] = entity.language;
	data['country'] = entity.country;
	data['lang'] = entity.lang;
	data['shareImage'] = entity.shareImage;
	data['movie'] = entity.movie;
	return data;
}

IMovieDetailWriter $IMovieDetailWriterFromJson(Map<String, dynamic> json) {
	final IMovieDetailWriter iMovieDetailWriter = IMovieDetailWriter();
	final List<IMovieDetailWriterData>? data = jsonConvert.convertListNotNull<IMovieDetailWriterData>(json['data']);
	if (data != null) {
		iMovieDetailWriter.data = data;
	}
	final int? createdAt = jsonConvert.convert<int>(json['createdAt']);
	if (createdAt != null) {
		iMovieDetailWriter.createdAt = createdAt;
	}
	final int? updatedAt = jsonConvert.convert<int>(json['updatedAt']);
	if (updatedAt != null) {
		iMovieDetailWriter.updatedAt = updatedAt;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		iMovieDetailWriter.id = id;
	}
	return iMovieDetailWriter;
}

Map<String, dynamic> $IMovieDetailWriterToJson(IMovieDetailWriter entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['data'] =  entity.data.map((v) => v.toJson()).toList();
	data['createdAt'] = entity.createdAt;
	data['updatedAt'] = entity.updatedAt;
	data['id'] = entity.id;
	return data;
}

IMovieDetailWriterData $IMovieDetailWriterDataFromJson(Map<String, dynamic> json) {
	final IMovieDetailWriterData iMovieDetailWriterData = IMovieDetailWriterData();
	final int? createdAt = jsonConvert.convert<int>(json['createdAt']);
	if (createdAt != null) {
		iMovieDetailWriterData.createdAt = createdAt;
	}
	final int? updatedAt = jsonConvert.convert<int>(json['updatedAt']);
	if (updatedAt != null) {
		iMovieDetailWriterData.updatedAt = updatedAt;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		iMovieDetailWriterData.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		iMovieDetailWriterData.name = name;
	}
	final String? lang = jsonConvert.convert<String>(json['lang']);
	if (lang != null) {
		iMovieDetailWriterData.lang = lang;
	}
	final String? person = jsonConvert.convert<String>(json['person']);
	if (person != null) {
		iMovieDetailWriterData.person = person;
	}
	return iMovieDetailWriterData;
}

Map<String, dynamic> $IMovieDetailWriterDataToJson(IMovieDetailWriterData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['createdAt'] = entity.createdAt;
	data['updatedAt'] = entity.updatedAt;
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['lang'] = entity.lang;
	data['person'] = entity.person;
	return data;
}

IMovieDetailActor $IMovieDetailActorFromJson(Map<String, dynamic> json) {
	final IMovieDetailActor iMovieDetailActor = IMovieDetailActor();
	final List<IMovieDetailActorData>? data = jsonConvert.convertListNotNull<IMovieDetailActorData>(json['data']);
	if (data != null) {
		iMovieDetailActor.data = data;
	}
	final int? createdAt = jsonConvert.convert<int>(json['createdAt']);
	if (createdAt != null) {
		iMovieDetailActor.createdAt = createdAt;
	}
	final int? updatedAt = jsonConvert.convert<int>(json['updatedAt']);
	if (updatedAt != null) {
		iMovieDetailActor.updatedAt = updatedAt;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		iMovieDetailActor.id = id;
	}
	return iMovieDetailActor;
}

Map<String, dynamic> $IMovieDetailActorToJson(IMovieDetailActor entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['data'] =  entity.data.map((v) => v.toJson()).toList();
	data['createdAt'] = entity.createdAt;
	data['updatedAt'] = entity.updatedAt;
	data['id'] = entity.id;
	return data;
}

IMovieDetailActorData $IMovieDetailActorDataFromJson(Map<String, dynamic> json) {
	final IMovieDetailActorData iMovieDetailActorData = IMovieDetailActorData();
	final int? createdAt = jsonConvert.convert<int>(json['createdAt']);
	if (createdAt != null) {
		iMovieDetailActorData.createdAt = createdAt;
	}
	final int? updatedAt = jsonConvert.convert<int>(json['updatedAt']);
	if (updatedAt != null) {
		iMovieDetailActorData.updatedAt = updatedAt;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		iMovieDetailActorData.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		iMovieDetailActorData.name = name;
	}
	final String? lang = jsonConvert.convert<String>(json['lang']);
	if (lang != null) {
		iMovieDetailActorData.lang = lang;
	}
	final String? person = jsonConvert.convert<String>(json['person']);
	if (person != null) {
		iMovieDetailActorData.person = person;
	}
	return iMovieDetailActorData;
}

Map<String, dynamic> $IMovieDetailActorDataToJson(IMovieDetailActorData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['createdAt'] = entity.createdAt;
	data['updatedAt'] = entity.updatedAt;
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['lang'] = entity.lang;
	data['person'] = entity.person;
	return data;
}

IMovieDetailDirector $IMovieDetailDirectorFromJson(Map<String, dynamic> json) {
	final IMovieDetailDirector iMovieDetailDirector = IMovieDetailDirector();
	final List<IMovieDetailDirectorData>? data = jsonConvert.convertListNotNull<IMovieDetailDirectorData>(json['data']);
	if (data != null) {
		iMovieDetailDirector.data = data;
	}
	final int? createdAt = jsonConvert.convert<int>(json['createdAt']);
	if (createdAt != null) {
		iMovieDetailDirector.createdAt = createdAt;
	}
	final int? updatedAt = jsonConvert.convert<int>(json['updatedAt']);
	if (updatedAt != null) {
		iMovieDetailDirector.updatedAt = updatedAt;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		iMovieDetailDirector.id = id;
	}
	return iMovieDetailDirector;
}

Map<String, dynamic> $IMovieDetailDirectorToJson(IMovieDetailDirector entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['data'] =  entity.data.map((v) => v.toJson()).toList();
	data['createdAt'] = entity.createdAt;
	data['updatedAt'] = entity.updatedAt;
	data['id'] = entity.id;
	return data;
}

IMovieDetailDirectorData $IMovieDetailDirectorDataFromJson(Map<String, dynamic> json) {
	final IMovieDetailDirectorData iMovieDetailDirectorData = IMovieDetailDirectorData();
	final int? createdAt = jsonConvert.convert<int>(json['createdAt']);
	if (createdAt != null) {
		iMovieDetailDirectorData.createdAt = createdAt;
	}
	final int? updatedAt = jsonConvert.convert<int>(json['updatedAt']);
	if (updatedAt != null) {
		iMovieDetailDirectorData.updatedAt = updatedAt;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		iMovieDetailDirectorData.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		iMovieDetailDirectorData.name = name;
	}
	final String? lang = jsonConvert.convert<String>(json['lang']);
	if (lang != null) {
		iMovieDetailDirectorData.lang = lang;
	}
	final String? person = jsonConvert.convert<String>(json['person']);
	if (person != null) {
		iMovieDetailDirectorData.person = person;
	}
	return iMovieDetailDirectorData;
}

Map<String, dynamic> $IMovieDetailDirectorDataToJson(IMovieDetailDirectorData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['createdAt'] = entity.createdAt;
	data['updatedAt'] = entity.updatedAt;
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['lang'] = entity.lang;
	data['person'] = entity.person;
	return data;
}